const express = require("express");
const router = express.Router();
const employee = require("./employee/index");
const matter = require("./employee/matter");
const salary = require("./employee/salary");
const leave = require("./employee/leave")
const train = require("./employee/train");
const addTime = require("./employee/addTime")

// 分页查询员工列表
router.post("/queryEmployees", employee.queryEmployees);
router.post("/addEmployee", employee.addEmployee);
router.post("/deleteEmployee", employee.deleteEmployee);
router.post("/updateEmployee", employee.updateEmployee);

// 签到
router.post("/queryAttendance", matter.queryAttendance);
router.post("/deleteAttendance", matter.deleteAttendance);
router.post("/updateAttendance", matter.updateAttendance);
router.post("/addAttendance", matter.addAttendance);

// 薪资
router.post("/querySalary", salary.querySalary)
router.post("/addSalary", salary.addSalary)
router.post("/deleteSalary", salary.deleteSalary)
router.post("/updateSalary", salary.updateSalary)

// 请假
router.post("/queryLeave",leave.queryLeave)
router.post("/addLeave",leave.addLeave)
router.post("/deleteLeave",leave.deleteLeave)
router.post("/updateLeave",leave.updateLeave)

// 加班
router.post("/queryOvertime",addTime.queryOvertime) 
router.post("/addOvertime",addTime.addOvertime) 
router.post("/deleteOvertime",addTime.deleteOvertime) 
router.post("/updateOvertime",addTime.updateOvertime) 

// 员工培训
router.post("/queryTraining", train.queryTraining);
router.post("/addTraining", train.addTraining);
router.post("/deleteTraining", train.deleteTraining);
router.post("/updateTraining", train.updateTraining);

module.exports = router; 